﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.tree1d">
<html>
	<head>
		<script src="da.js" langruage="javascript"></script>
		<script src="daTreeCore_source.js" langruage="javascript"></script>
		<script>
				da(function(){
					
					var list = [], pid, nid;
da.testA();
					var tree1 = daTreeCore({
						id: "0", 
						name: "tree1"
					});
					
					for( var i=0; i<10; i++ ){
						nid = "node" + i;
						pid = "0";
						
						for( var ii=0; ii<10; ii++ ){
								nid = "node" + i + ii;
								pid = "node"+i;
								tree1.add({ pid: pid, id: "node"+(i + "" + ii), name:"node" + (i + "" + ii), data:null });
								
								for( var iii=0; iii<100; iii++ ){
										nid = "node"+ i + ii + iii;
										pid = "node" + i + ii;
										tree1.add({ pid: pid, id: nid, name: nid, data:null });
								}
								
						}
						nid = "node" + i;					//测试不规范数据
						pid = "0";
						tree1.add({ pid: pid, id: nid, name: nid, data:null });
						
					}

					tree1.load();
da.out(da.testB());
debugger;
					/*
					var arrTmp = [];
					tree1.run( function( isEnd ){
						if( !isEnd ){
							da.out( this.setting.name );
						}
					});
					
					//tree1cObj.removeNode("0");
					tree1.clear();
					tree1.addNode({
						pid: "0", 
						id: "node"+(i + "" + ii), 
						name:"node" + (i + "" + ii), 
						data:"徐飞" 
					});
					
					arrTmp = [];
					tree1.run( function( isEnd ){
						if( !isEnd )
							arrTmp.push( this.data );
						if( isEnd ){
							da.out( arrTmp );
						}
					});
					*/
				});
		</script>
		
	</head>
	
	
	<body>

	</body>

</html>